import request from '../../../../../public/js/common/api/api.js';

const FeedBackUrl = Utils.CurDomain.FeedBackUrl;

/**
 *
 * @file生物安全审计API
 */
export default class AuditAPI {
    // 获取审计表列表
    static auditFormBills (data) {
        let { search, pageIndex, pageSize, type } = data;
        return request.post(`${FeedBackUrl}/auditformbills/p/list`, data);
    }

    //查询详情
    static getAuditFormBills (id) {
        return request.get(`${FeedBackUrl}/auditformbills/${id}`);
    }
    // 提交整改反馈
    static submitRectify (data) {
        return request.post(`${FeedBackUrl}/auditformbills/track`, data);
    }
    /**
    * 获取组织信息
    * @param data
    * @returns 
    */
    static getOrgInfo(upoid, aotype) {
        return request.get(`${Utils.CurDomain.SysPlfUrl}/yyorgunits/by/q?upoid=${upoid}&aotype=${aotype}`);
    }
    /**
     * 获取审查项列表
     * @param 
     * @returns 
     */
    static getAuditItemsList(data) {
        return request.post(`${FeedBackUrl}/audititems/p`, data,true);
    }
    /**
     * 新增审查表
     * @param data
     * @returns 
     */
    static setAuditTables(data) {
        return request.post(`${FeedBackUrl}/auditformbills`, data,true);
    }
    /**
     * 修改审查表
     * @param data
     * @returns 
     */
    static updateAuditTables(data) {
        return request.put(`${FeedBackUrl}/auditformbills/${data.id}`, data,true);
    }
}